package main

import (
	"fmt"
)

type Point struct{
	x int 
	y int 
}

func main(){

	var a interface{}

	var point = Point{1,2}

	a = point

	var b Point 
	//b = a 不可以赋值
	b = a.(Point) //类型断言
	fmt.Println(b)

	var j interface{}
	var m float32 = 112.2

	j  = m 

	//var k float32 
	
	if k,ok:=j.(float32);ok==true{
		fmt.Println("类型断言ok")
		fmt.Printf("%T,%v\n",k,k)
	}else{
		fmt.Println("类型断言失败")
	}


	//fmt.Println(k)
}